package com.example.bootintegration.actuator;

import org.springframework.boot.actuate.endpoint.annotation.DeleteOperation;
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
import org.springframework.boot.actuate.endpoint.annotation.WriteOperation;
import org.springframework.stereotype.Component;

@Component
@Endpoint(id = "my")
// @WebEndpoint()
public class EndpointCustom {

   @ReadOperation
   public String endpointCustomRead(String content) {
      return "请求的内容: " + content;
   }

   @WriteOperation
   public String endpointCustomWrite(String content) {
      return "写的内容: " + content;
   }

   @DeleteOperation
   public String endpointCustomDelete(String content) {
      return "删除的内容: " + content;
   }

}